package exception;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;

public class ThrowDemo {
    public static void main(String[] args) throws FileNotFoundException {
        /*Student zs = new Student();
        zs.setAge(1000);
        System.out.println("此人的年龄为:"+zs.getAge()+"岁");*/
        Student zs = new Student();
        FileNotFoundException fos = new FileNotFoundException("");

         /*
        Student zs = new Student();
       try{
            zs.setAge(1000);
            System.out.println("此人的年龄为:"+zs.getAge()+"岁");
        }catch(RuntimeException e){
            System.out.println("年龄不合法");
        }

          */

    }
}
